package cn.xxc.org.domain;

import cn.xxc.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/*
*   部门实体
* */
@Data
public class Department extends BaseDomain {
    //部门id
    private String sn;
    //部门名字
    private String name;
    //路径
    private String dirPath;
    //状态
    private Integer state;
    //经理id
    private Long manager_id;
    //部门上级id
    private Long parent_id;


    //上级部门部门
    private Department department;
    //员工表
    private Employee employee;

    //用于封装当前部门的子部门
    //部门树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children=new ArrayList<>();
}
